WIP: feat(doc): Add a doc for beginners#474
WIP: feat(doc): Add a doc for beginners#474tempdragon wants to merge 1 commit intorust-lang:masterfrom
Conversation
1. Info on How to Enble Enable `rust-analyzer` Support 2. Info on How to Compile External Project with `cg_gcc`
|
Maybe it is possible to map the |
| 1. Run the program with (in the root dir of `rustc_codegen_gcc` )(where `--manifest-path` is the path to the `Cargo.toml` of the project to run `cargo` against): | ||
|
|
||
| ```shell | ||
| ./y.sh cargo --manifest-path="..." |
|
|
||
|
|
||
| ```shell | ||
| alias cargcc="/path/to/rustc_codegen_gcc/y.sh cargo" |
| ./y.sh cargo --manifest-path="..." | ||
| ``` | ||
|
|
||
| or you may as well add this alias in your `.bash_aliases`: |
There was a problem hiding this comment.
I'd drop this whole part. I never used .bash_aliases, only .bashrc for example. Having something so specific seems a bit too much imo.
There was a problem hiding this comment.
Since I find it very useful to have an alias, I'd keep this part.
I didn't know about .bash_aliases either: I'll let the author rename that to .bashrc if they find that appropriate.
| 2. Install rust-src with rustup: `rustup component add rust-src`. | ||
| NOTE: Make sure you've switched to the corresponding toolchain as is used by cg_gcc | ||
| 3. Set the lsp option `rust-analyzer.rustc.source = "discover"` (you can also set it to an explicit path), depending on your editor. | ||
| 1. Neovim(nvim-lspconfig): |
There was a problem hiding this comment.
Please drop this part, there are a lot of IDEs, adding docs for some of them is not useful.
There was a problem hiding this comment.
In my point of view, it may be trivial for us that these steps are necessary, but probably harder for others to figure it out. Adding this may potentially add to contributors(since we only have no more than 100 developers).
There was a problem hiding this comment.
I'm OK with keeping this part since it's useful and people can propably understand what they need to do for their own IDE from these instructions.
antoyo
left a comment
There was a problem hiding this comment.
Sorry for the long delay in reviewing. I forgot about this PR.
(Feel free to ping me what that happens.)
| ./y.sh cargo --manifest-path="..." | ||
| ``` | ||
|
|
||
| or you may as well add this alias in your `.bash_aliases`: |
There was a problem hiding this comment.
Since I find it very useful to have an alias, I'd keep this part.
I didn't know about .bash_aliases either: I'll let the author rename that to .bashrc if they find that appropriate.
| 2. Install rust-src with rustup: `rustup component add rust-src`. | ||
| NOTE: Make sure you've switched to the corresponding toolchain as is used by cg_gcc | ||
| 3. Set the lsp option `rust-analyzer.rustc.source = "discover"` (you can also set it to an explicit path), depending on your editor. | ||
| 1. Neovim(nvim-lspconfig): |
There was a problem hiding this comment.
I'm OK with keeping this part since it's useful and people can propably understand what they need to do for their own IDE from these instructions.
rust-analyzerSupportcg_gcc